Skip to content

feat(blocs): compose pages from sections, grids and single object blocs - #1292

Merged
ThibaudDauce merged 24 commits into
mainfrom
feat/blocs-sections
Oct 26, 2026
Merged

ThibaudDauce merged 24 commits into
mainfrom
feat/blocs-sections

Conversation

@ThibaudDauce

@ThibaudDauce ThibaudDauce commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

ThibaudDauce added a commit that referenced this pull request Oct 22, 2026
…edito page gets its metrics (#1295)

The admin edito page and the public page share the same `useSiteBlocs`
cache key but not the same `X-Fields`. Clicking "Éditer sur la page
publique" from `/admin/site/edito/datasets` reuses the admin response,
without `metrics`:

```
TypeError: Cannot read properties of undefined (reading 'datasets')
    at pages/datasets/index.vue
```

Same for reuses and dataservices. Found while testing
#1292
:icon="RiAddLine"
@click="workingBlocs.splice(index, 0, newSection())"
>
{{ $t('Ajouter une section') }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think it's related to this PR, but the first button, above the first section is half-hidden by the header menu

# Conflicts:
#	components/Pages/EditoBlocs.vue
#	tests/edito/pages-editor.spec.ts
#	tests/edito/pages-editor.spec.ts-snapshots/edito-page-final-chromium-linux.png
#	tests/edito/pages-editor.spec.ts-snapshots/edito-page-final-firefox-linux.png
# Conflicts:
#	components/Pages/BrandedButtonEditor.vue
#	components/Pages/EditoBlocs.vue
#	components/Pages/LinksListBloc.vue
#	components/Pages/MarkdownBloc.vue
#	components/Posts/PostView.vue
#	tests/posts/blocs.spec.ts
ThibaudDauce added a commit to opendatateam/udata that referenced this pull request Oct 26, 2026
…cs (#4026)

See also datagouv/cdata#1292

The migration rewrites the blocs of all the posts, organizations and the
site. For this release, deploy cdata first, then the workers and the
frontends, and run `udata db migrate` only after: the current code can't
load the migrated blocs (`NotRegistered` on `SectionBloc`), while the
new one still reads the old format. Between the two deployments, no
editorial page can be saved: the current udata refuses the sections the
new cdata sends (400). Deploy both back to back.

A subtitle without a title becomes a `MarkdownBloc`, so it is now
rendered as markdown. A hero becomes a colored section, of a neutral
background on an organization (2 in production), and a list of links is
split into a text, its links and a button. A title inside an accordion
goes from `h2` to `h4`.

The blocs served by `/api/1/site/`, `/api/1/posts/<id>/` and
`/api/1/organizations/<id>/` change shape.
@ThibaudDauce
ThibaudDauce merged commit 54710cb into main Oct 26, 2026
16 checks passed
@ThibaudDauce
ThibaudDauce deleted the feat/blocs-sections branch October 26, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants